<?php
/*
 * [JINYUN!] (C)2001-2099 Jinyunweb.com
 * This is NOT a freeware, use is subject to license terms
*/
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'main';
cfc('core')->checklogin('jy_jdpm/member.index/');
$return=array();
set_html('title','日志-'.$this->plugin_setting('basic')['title']);

if($_RQ['op']=='main'){
	$list=array();
	$return['list']=$list;
	exi($return);
}
if($_RQ['op']=='list'){
	
	$params=array('uniacid'=>$_SESSION['uniacid'],'mid'=>$_SESSION['uid']);
	$pindex = max(1, intval($_RQ['page']));
	$psize = 100;
	$total='';
	$fields=array();
	$list=pdo_getslice('jy_jdpm_money_log',$params,array($pindex,$psize),$total,$fields,'','create_time desc');
	if($list){
		foreach($list as &$item){
			$item['pname']=pdo_getcolumn('jy_jdpm_auction',array('uniacid'=>$_SESSION['uniacid'],'id'=>$item['pid']),'pname');
			if($item['pid']){
				$item['url']=custom_url('jy_jdpm/detail//id='.$item['pid'],true);
			}
		}
	}
	$totalpage=ceil($total/$psize);
	$totalpage=intval($totalpage);
	$return['totalpage'] =$totalpage;
	$return['params']['page'] =$pindex;
	$return['list']=$list;
	exi($return);
}